<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=`, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <input aaa="123" type="text" v-model="school.name" />
      <div>{{getName}}</div>
      <div>{{school.name}}</div>
      <div>{{school.age}}</div>
      <ul>
        <li>1</li>
        <li>1</li>
      </ul>
      <button v-on:click="change">更新操作</button>
    </div>
    <script src="vue.js"></script>
    <script>
      let vm = new Vue({
        el: "#app",
        data() {
          return {
            name: "zf",
            school: {
              name: "张三",
              age: 10,
            },
          };
        },
        computed: {
          getName() {
            return this.school.name + "Hello";
          },
        },
        methods: {
          change() {
            this.school.name = "李白";
          },
        },
      });
    </script>
  </body>
</html>
